import std.stdio;

extern(C){
    align(1) struct uint_24
    {
        uint u;
        ushort b;
    }
}

struct aa
{
    this(int a){this.a = a;}
    int a = 0;
    
    static void showS(aa * b)
    {
        writeln("--show : ", b.a);
    }
    
    void show()
    {
        showS(&this);
    }
}

void main()
{
    ubyte[] buffer = [0xff,0xff,0xff,0xff, 0xff];
    uint_24 * a = cast(uint_24 *)(buffer.ptr);
    writefln("u is : %x", a.u);
    writefln("b is : %x", a.b);
    
    aa ab;
    writeln("ab.a " , ab.a);
    ab.show;
    
    aa b = aa(10);
    writeln("b.a " , b.a);
    
    
}
